<template>
    <div class="test1">
        <h1>这是一个用来测试的test1组件</h1>
        <h1>{{msg}}</h1>
        <button @click="onClick">按钮(穿递数据给父级))</button>
    </div>
</template>
<script>
import Emitter from '../mixin/emitter'
export default {
  name: 'test1',
  mixins: [Emitter],
  data() {
    return {
      msg: 123
    }
  },
  methods: {
    onClick() {
      this.msg++
      this.dispatch('home', 'sss', this.msg)
    }
  }
}
</script>
<style scoped>
.test1 {
  color: #333;
}
</style>
